package app;


import javax.swing.JTextArea;


import cqueue.EventQueueFactory;
import cqueue.ListenerEventQueue;

public class CircleDriver
{
	public static void main(String args[]) 
	{
		ListenerEventQueue queue;
		JTextArea          textArea;
		NetworkConfig      netConf = NetworkConfig.getInstance();
		String             txt;
		CircleWindow          guy;
		
		if(args.length > 0)
		{
			if(args[0].equals("master"))
			{
				System.out.println("Starting master window...");
				queue = EventQueueFactory.createMasterListenerQueue(netConf.getEventPort()); 
			}
			else
			{
				System.out.println("Starting node window...");
				queue = EventQueueFactory.createNodeListenerQueue(netConf.getMasterHost(), netConf.getEventPort()); 
	
			}
		}
		else
		{
			queue = EventQueueFactory.createLocalListenerQueue();
		}
		
	}
}
